/*
 *  smtp.h
 *
 *  Very simple STMP mail send.  With STARTTLS and AUTH PLAIN 
 *  support (ie Encryption).
 *
 * Copyright (c) 2006 Karlan Thomas Mitchell<karlanmitchell@gmail.com>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, is prohibited except by
 * Karlan Thomas Mitchell.
 *
 * THIS SOFTWARE IS PROVIDED BY KARLAN THOMAS MITCHELL AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */






#ifndef __SIMPLE___SMTP__H__
#define __SIMPLE___SMTP__H__
#include "portable_socket.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>

#ifndef PATH_MAX
#define PATH_MAX 255
#endif

#ifdef SMTP_DEBUG
	#define smtp_debug printf
#else
        int smtp_debug(const char * format, ...);
#endif


int send_email_file(char * smtpserver, char * subject, char * from, char * password, char * to, char * filename);
int send_email(char * smtpserver, char * subject, char * from, char * password, char * to, char * message);	
int send_email_bare(char * ip, int short unsigned port, char * servername, char * subject, char * from, char * password, char * to, char * message);
#endif 
